function drawHist1D(hist, T)
    % DRAWHIST1D  draw DCT-coff histgram.
    % DRAWHIST1D(HIST) draws image's DCT-coef distribution using bar,
    % where HIST is a matrix for DCT-coef histgram, and T is the range.
    figure;
    [M, N] = size(hist);
    if nargin < 2
        T = floor(M/2);
    end
    lx = -T:T;
    disp([lx;hist]);
    handle = bar(lx,hist);
    axis([-T T 0 1]);
    grid on;
    xlabel('VALUE');
    ylabel('PERCENTAGE');
end
